package com.searchcloud.been;

import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class Menu {

    public static final String WATCH_MOVIE="watch_movie";
    public static final String MY_SUBSCRIBE="my_subscribe";
    public static final String SEARCH="search";
    private List<ButtonBean> button;

    public List<ButtonBean> getButton() {
        return button;
    }

    public void setButton(List<ButtonBean> button) {
        this.button = button;
    }

    public static class ButtonBean {
        /**
         * type : click
         * name : 我要看剧
         * key : watch_movie
         */

        private String type;
        private String name;
        private String key;

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }
    }
    public static String creatMenuData(){
        Menu menu=new Menu();
        ButtonBean button1=new ButtonBean();
        button1.name="我要看剧";
        button1.key="watch_movie";
        button1.type="click";
        ButtonBean button2=new ButtonBean();
        button2.name="我的订阅";
        button2.key="my_subscribe";
        button2.type="click";
        ButtonBean button3=new ButtonBean();
        button3.name="分类搜索";
        button3.key="search";
        button3.type="click";
        List<ButtonBean> data=new ArrayList<ButtonBean>();
        data.add(button1);
        data.add(button2);
        data.add(button3);
        menu.setButton(data);
       return JSONObject.toJSONString(menu);
    }

}
